<script setup lang="ts">
import { useInjectDisabled } from 'ant-design-vue/es/config-provider/DisabledContext';
import type { InputProps } from 'ant-design-vue';

const props = withDefaults(defineProps<InputProps>(), {
  bordered: true,
  disabled: undefined,
});

const antdDisabled = useInjectDisabled();
const disabled = computed(() => props.disabled ?? antdDisabled.value ?? false);
</script>

<template>
  <AInputPassword
    v-bind="{ ...$attrs, ...$props }" :disabled="disabled"
    allowClear autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false"
  >
    <template #prefix>
      <i class="i-ri:lock-password-fill mr-1 text-1.2em text-sys-text-body" />
    </template>
  </AInputPassword>
</template>
